<include file="../Public/_header.html" />
<div class="so_main">
		  
		  <!-------- 搜索开始 -------->
		  <div id="search_div" rel='0'>
		  	<div class="page_tit">
		  		搜索代金券码[ <a href="javascript:void(0);" onclick="_show_searcharea();">隐藏</a> ]
		  	</div>
				
				<div class="sform">
					<form method="post" action="{:U('/Cashcoupon/code')}" id="searchForm">
						<input id="pno" name="pno" type="hidden" value="1">
						<dl>
							<span>代金券码：</span>
					        <input name="passcode" id="passcode" type="text" value="{$passcode}">
					        <input name="cashcoupon_id" id="cashcoupon_id" type="hidden" value="{$cashcoupon_id}">
					    	<input type="submit" class="btn_b" value="搜索" />
					    	&nbsp;&nbsp;&nbsp;&nbsp;
					    	<input type="reset" class="btn_b" value="清空" />
					    </dl>
					</form>
					<div class="clear"></div>
			  </div>
		  </div>
		  <!-------- 搜索结束 -------->
		  

  <div class="page_tit">代金券码</div>
  <div class="Toolbar_inbox">
  		<a href="javascript:void(0);" class="btn_a" onclick="_show_searcharea();">
			<span>条件搜索</span>
		</a>
  </div>
  
  <div class="list">
  <table id="goods_list" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th class="line_l" style="text-align:center">券码</th>
    <th class="line_l" style="text-align:center">有效|取消</th>
    <th class="line_l" style="text-align:center">名称</th>
    <th class="line_l" style="text-align:center">类型</th>
    <th class="line_l" style="text-align:center">金额</th>
    <th class="line_l" style="text-align:center">开始时间</th>
    <th class="line_l" style="text-align:center">结束时间</th>
    <th class="line_l" style="text-align:center">相关商户</th>
    <th class="line_l" style="text-align:center">相关商品</th>
    <th class="line_l" style="text-align:center">是否有效</th>
    <th class="line_l" style="text-align:center">使用时间</th>
  </tr>
  <volist id="vo" name="datapage['data']">
  		<php>
  			$_tmp_cc = $cc_list[$vo['cashcoupon_id']];
  			if(empty($_tmp_cc)){
  				$cc_list[$vo['cashcoupon_id']] = M('Cashcoupon')->find($vo['cashcoupon_id']);
  				$_tmp_cc = $cc_list[$vo['cashcoupon_id']];
  				
  			}
  			$_rule_data = unserialize($_tmp_cc['rule_data']);
  		</php>
      <tr overstyle='on' id="cashcoupon_{$vo.id}">
        <td>{$vo['passcode']}</td>
        <td style="text-align:center;padding: 6px 0 6px 0px;color:red">
        	{$_tmp_cc.enable}&nbsp;|&nbsp;{$_tmp_cc.is_canceled}</td>
 		<td style="text-align:center">{$_tmp_cc['title']}</td>
 		<td style="text-align:center">{$_tmp_cc['sort_code']|getCategoryName}</td>
		<td style="text-align:center">{$_tmp_cc.amount}元</td>
		<td style="text-align:center">{:paramMillisecond2Date($_tmp_cc['stime'],'Y-m-d H:i', '未设置' )}</td>
		<td style="text-align:center">{:paramMillisecond2Date($_tmp_cc['etime'],'Y-m-d H:i', '未设置' )}</td>
		
		<td style="text-align:center">{:getParnterTitle( substr( $_rule_data['partner_id'], 2 ) )}</td>
		<td style="text-align:center">{:getGoodsTitle( substr( $_rule_data['goods_id'], 2 ) )}</td>
		<td style="text-align:center"><php>if( $vo['enable']=='N' || $vo['is_delete']=='Y' ){</php>无效<php>}else{</php>有效<php>}</php></td>
		<td style="text-align:center">{:paramMillisecond2Date($vo['ctime'],'Y-m-d H:i', '未设置' )}</td>
      </tr>
  </volist>
  </table>

  </div>
  <div class="Toolbar_inbox">
    <div class="page_box">{$datapage['html']}</div>
  </div>
 
</div>

 <div class="clear"></div>

<script>
    //鼠标移动表格效果
    $(document).ready(function(){
    	table_init();
    });
</script>

<include file="../Public/_footer.html" />